import com.ycf.mapper.UserMapper;
import com.ycf.pojo.User;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class te {
    @Test
    public void t() {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserMapper mapper = context.getBean("userMapper", UserMapper.class);
        List<User> userList = mapper.getUserList();
        for (User user : userList) {
            System.out.println("user = " + user);
        }
    }
}
